package com.arpa.wms.domain.entity;

import com.arpa.ntocc.common.domain.entity.BasicEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 自定义报表
 * </p>
 *
 * @author wangyujie
 * @since 2020-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_diy_report")
@ApiModel(value="DiyReport对象", description="自定义报表")
public class DiyReport extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一code")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "组织机构编码")
    @TableField("branch_code")
    private String branchCode;

    @ApiModelProperty(value = "报表名称")
    @TableField("name")
    @Length(max = 100, message = "报表名称长度不能大于100个文字", groups = {Save.class, Update.class})
    private String name;

    @ApiModelProperty(value = "报表类型：0 库存明细，1 出库流水，2 入库流水")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "是否是默认0-不是，1-是")
    @TableField("is_default")
    private Integer isDefault;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    @Length(max = 255, message = "备注长度不能大于255个文字", groups = {Save.class, Update.class})
    private String remark;

    public interface Save{}
    public interface Update{}


}
